package wsz.code.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import wsz.code.client.fallback.ServiceEmailClientFallBack;

/**
 * Feign服务调用
 * @author wsz
 * @date 2021/12/27 11:35
 **/
@Component
@FeignClient(name = "service-email", path = "email", fallback = ServiceEmailClientFallBack.class)
public interface ServiceEmailClient {

    @RequestMapping(value = "sendCode/{email}/{code}", method = RequestMethod.GET)
    boolean sendCode(@PathVariable(value = "email") String email, @PathVariable(value = "code") String code);
}
